﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Nirvana
{
    /// <summary>
    /// 脚印数据脚本
    /// </summary>
    [CreateAssetMenu(fileName = "Footprint", menuName = "Nirvana/Render/Footprint")]
    public sealed class Footprint : ScriptableObject
    {
        [Tooltip("The material for the footprint.")]
        [SerializeField]
        private Material material;
        [Tooltip("The uv1 of this footprint.")]
        [SerializeField]
        private Vector2 uv1 = new Vector2(0f, 0f);
        [Tooltip("The uv2 of this footprint.")]
        [SerializeField]
        private Vector2 uv2 = new Vector2(1f, 0f);
        [Tooltip("The uv3 of this footprint.")]
        [SerializeField]
        private Vector2 uv3 = new Vector2(0f, 1f);
        [SerializeField]
        [Tooltip("The uv4 of this footprint.")]
        private Vector2 uv4 = new Vector2(1f, 1f);
        [SerializeField]
        [Tooltip("The size of this footprint.")]
        private Vector2 size = new Vector2(0.15f, 0.5f);
        [SerializeField]
        [Tooltip("The furation of this footprint.")]
        private float duration = 5f;
        [Tooltip("The fadeout of this footprint.")]
        [SerializeField]
        private float fadeout = 1f;
        [Tooltip("The distance the footprints are places above the surface it is placed upon.")]
        [SerializeField]
        private float groundOffset = 0.02f;

        public Material Material { get { return material; } }
        public Vector2 UV1 { get { return uv1; } }
        public Vector2 UV2 { get { return uv2; } }
        public Vector2 UV3 { get { return uv3; } }
        public Vector2 UV4 { get { return uv4; } }
        public Vector2 Size { get { return size; } }
        public float Duration { get { return duration; } }
        public float Fadeout { get { return fadeout; } }
        public float GroundOffset { get { return groundOffset; } }
    }
}

